
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="ww" uri="webwork" %>
<%@ taglib prefix="bk" uri="bank" %>
<%
		String path = request.getContextPath();
		String basePath = request.getScheme() + "://" + request.getServerName()
				+ ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>人员管理</title>
<LINK href="./css/style.css" type=text/css rel=stylesheet>
<script src="./js/date.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #5CB7FE;
}
.STYLE1 {font-size: 12px}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
.STYLE7 {font-size: 12px; font-weight: bold; }
.STYLE8 {
	font-size: 16px;
	font-weight: bold;
}
-->
 </style>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language="javascript">
	function setall(){
			var ss=document.form1.item("select");
			for(var i=0;i<ss.length;i++){
					document.form1.item("select",i).checked=true;
				}
		}
	function setnull(){
			var ss=document.form1.item("select");
			for(var i=0;i<ss.length;i++){
					document.form1.item("select",i).checked=false;
				}
		}	

	function update(){
		var count=0;
		var userid;
		for(var i=0; i<document.form1.select.length; i++){
			if(document.form1.select[i].checked){
				userid = document.form1.select[i].value;
				count++;				
			}
		}
		if(count == 0 ){
			alert("请选择一项要更新的用户");
			return false;		
		}
		if(count > 1 ){
			alert("只能选择一个用户");
			return false;		
		}
		form1.action="employeeGet.action";
		form1.submit();
	}
	function del(){
	var count=0;
		for(var i=0; i<document.form1.select.length; i++){
			if(document.form1.select[i].checked){
				count++;
			}
		}
		if(count == 0){
			alert("请至少选择一项");
			return false;		
		}
		if(confirm('您确定要删除用户吗？删除后不可恢复!!!')){
			form1.action="employeeDel.action";
			form1.submit();
		}else{		
			return false;
		}
	}
</script>		
</head>
<body style="overflow-x:hidden">
<ww:property value="msg"/>
<table width="850" height="568" border="0" cellpadding="0"
	cellspacing="0" bordercolor="#D8EDFF">
	<!--DWLayoutTable-->
	<tr>
		<td height="8" colspan="4" valign="top"></td>
		<td width="834" valign="top"></td>
		<td width="5" valign="top"></td>
	</tr>
	<tr>
		<td height="5" colspan="3" align="right" valign="top"><img
			src="images/icon1.jpg" width="6" height="5" /></td>
		<td colspan="2" valign="top"><img src="images/icon2.jpg" width="100%"
			height="5" /></td>
		<td valign="top"><img src="images/icon3.jpg" width="5" height="5" /></td>
	</tr>
	<tr>
		<td width="7" height="523">&nbsp;</td>
		<td width="5" align="right" valign="top" background="images/icon5.jpg"><img
			src="images/icon5.jpg" width="5" height="5" /></td>
		<td colspan="2" valign="top" bgcolor="#D8EDFF">&nbsp;</td>
		<td valign="top">
		<table width="100%" border="0" cellpadding="0" cellspacing="0"
			bgcolor="#D8EDFF">
			<!--DWLayoutTable-->
			<tr>
				<td height="30" colspan="3" valign="middle"><span class="STYLE1">&nbsp;[人员管理]--&gt;[用户管理]</span></td>
				<td width="29">&nbsp;</td>
			</tr>
			
			<tr>
				<td height="59" colspan="3" align="center" valign="middle">
					<span class="STYLE8">用户管理</span></td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td width="90" height="345">&nbsp;</td>
				<td width="672" valign="top">
				<table width="100%" border=0 cellpadding=0 cellspacing=1
					bgcolor=5cb7fe>
				  <!--DWLayoutTable-->
					<form name="searchform" method="post" action="employeeSearch.action">
					<tr>
						<td height="25" colspan="8" align="center" valign="top"
							bgcolor="#D8EDFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
						  <!--DWLayoutTable-->
						  <tr>
						    <td width="236" height="25" align="center" valign="middle"
							bgcolor="#D8EDFF">
						      <span class="STYLE1">用户名：
					          </span>
					        <input name="keyword" type="text" style="height:18px;" size="20">						</td>
				      <td width="425" valign="middle"
							bgcolor="#D8EDFF"><input type="submit" name="Submit" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'"
onMouseOut="this.className='btn1_mouseout'" value=" 搜 索 "></td>
					</tr>
					    </table>						</td>
			          </tr>
					</form>
					<form name="form1" method="post" >
					<tr>
						<td width="73" height="25" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE7">用户名</span></td>
						<td width="72" align="center" valign="middle"
							bgcolor="#D8EDFF" class="STYLE7">真实姓名</td>
						<td width="50" align="center" valign="middle" bgcolor="#D8EDFF" class="STYLE7">性别</td>
					    <td width="128" align="center" valign="middle" bgcolor="#D8EDFF" class="STYLE7">身份证号码</td>
					    <td width="109" align="center" valign="middle" bgcolor="#D8EDFF" class="STYLE7">固定电话</td>
					    <td width="110" align="center" valign="middle" bgcolor="#D8EDFF" class="STYLE7">移动电话</td>
					    <td width="75" align="center" valign="middle" bgcolor="#D8EDFF" class="STYLE7">注册日期</td>
					    <td width="37" align="center" valign="middle" bgcolor="#D8EDFF" class="STYLE7">选择</td>
					</tr>

				<ww:iterator value="employeeList">	
					<tr>
					  <td height="25" align="center" valign="middle"
							bgcolor="#D8EDFF" class="STYLE1">
							<ww:property value="userinfo.username"/>					  </td>
					  <td align="center" valign="middle"
							bgcolor="#D8EDFF" class="STYLE1">
							<ww:property value="realname"/></td>
					  <td align="center" valign="middle"
							bgcolor="#D8EDFF" class="STYLE1">
							<ww:property value="sex"/>					  </td>
					  <td align="center" valign="middle"
							bgcolor="#D8EDFF" class="STYLE1"><ww:property value="cardcode"/></td>
					  <td align="center" valign="middle"
							bgcolor="#D8EDFF" class="STYLE1"><ww:property value="phone"/></td>
					  <td align="center" valign="middle"
							bgcolor="#D8EDFF" class="STYLE1"><ww:property value="mobile"/></td>
					  <td align="center" valign="middle" bgcolor="#D8EDFF" class="STYLE1">
					        <bk:dateconvert value="userinfo.regtime" textformat="yyyy-MM-dd"/></td>
					  <td align="center" valign="middle" bgcolor="#D8EDFF" class="STYLE1"><ww:checkbox name="userid" id="select" fieldValue="%{userinfo.userid}"/> </td>
				   </tr>
				</ww:iterator>
					<tr>
					  <td height="25" colspan="7" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1"><ww:property value="pageBar"/>
						  </span></td>
					<td height="25" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">
					  <ww:checkbox name="checkall" id="select" fieldValue="" onclick="this.checked?setall():setnull();" />
					</span></td>
					</tr>
				</table>
				</td>
				<td width="43">&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td height="43">&nbsp;</td>
				<td align="center" valign="middle"><input type="button" name="Submit2" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'"
onMouseOut="this.className='btn1_mouseout'" value="添加用户" onclick="window.location='/employee/employeeAdd.jsp'">
			    &nbsp;  &nbsp; <input type="button" name="Submit3" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'"
onMouseOut="this.className='btn1_mouseout'" value="更新用户" onclick="update()">
			    &nbsp;&nbsp;&nbsp; <input type="button" name="Submit4" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'"
onMouseOut="this.className='btn1_mouseout'" value="删除用户" onclick="del()">			    </td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			</form>



			<tr>
				<td height="72" colspan="4" valign="top">
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<!--DWLayoutTable-->
					<tr>
						<td width="834" height="72">&nbsp;</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
		<td valign="top" background="images/icon6.jpg"><img
			src="images/icon6.jpg" width="5" height="100%" /></td>
	</tr>



	<tr>
		<td height="5"></td>
		<td valign="top"><img src="images/icon7.jpg" width="5" height="5" /></td>
		<td colspan="3" valign="top"><img src="images/icon8.jpg" width="100%"
			height="5" /></td>
		<td valign="top"><img src="images/icon9.jpg" width="5" height="5" /></td>
	</tr>
	<tr>
		<td height="2"></td>
		<td></td>
		<td width="1"></td>
		<td width="6"></td>
		<td></td>
		<td></td>
	</tr>
</table>
</body>
</html>
